﻿using CRM.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Caching.Memory;

namespace CRM.Services
{
    public class BaseService//没有按需实例化Service，额外增加了不必要的开销
    {
        public UserManager<User> UserManager { get; set; }
        public HttpContext HttpContext { get; set; }
        public HttpRequest Request => HttpContext?.Request;
        public User CurrentUser { get; set; }
        public IMemoryCache Cache { get; set; }
        public MyDbContext DbContext { get; set; }
        public string Error { get; protected set; }
    }
}
